package com.lemon.ashe.controller;

import com.alibaba.fastjson.JSONObject;
import com.lemon.ashe.service.IOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: SpringBootZoo
 * @author: Mr.Young
 * @create: 2021/4/15 23:04
 **/
@RestController
@RequestMapping("/seata")
public class SeataController {


    @Autowired
    private IOrderService orderService;

    @GetMapping("getById/{id}")
    public String getById(@PathVariable("id") Integer id) {
        return JSONObject.toJSONString(orderService.getById(id));
    }
}
